package com.ruoyi.system.service.impl;

import com.ruoyi.common.annotation.ADDDataSource;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.system.mapper.SysDatasourceMapper;
import com.ruoyi.system.service.ISysDataSourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author: youguoen
 * Date: 2024/1/3
 */
@Service
@ADDDataSource
public class SysDataSourceServiceImpl implements ISysDataSourceService {

    @Autowired
    private SysDatasourceMapper datasourceMapper;


    @Override
    public List<Map<String, Object>> queryFieldsForMysql(String tableName,String dataSource) {
        return datasourceMapper.queryFieldsForMysql(tableName);
    }


    @Override
    public List<Map<String, Object>> queryFieldsForCK(String tableName,String dataSource) {
        return datasourceMapper.queryFieldsForCk(tableName);
    }
}
